<?php

namespace app\admin\validate;
use think\Validate;

class Informations extends Validate {

    protected $rule = [
        'title' => 'require|unique:informations',
        'keywords' => 'require',
        'sort'=>'require',
        'content'=>'require',
    ];

    protected $message = [
        'title.require' => '资讯名称不能为空',
        'title.unique' => '资讯名称不能重复',
        'keywords.require' => '关键词不能为空',
        'sort.require' => '排序不能为空',
        'content.require' => '内容不能为空'

    ];



    protected $scene = [
        'edit' => [
           'title',
        ],
    ];

}